home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disc 15
/
Commodore_Disc_15_19xx_-_de.d64
/
ca - graf
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
16KB
|
342 lines
0 rem********* ca - graf *************
1 poke157,.:poke53269,.:ifu=.thengosub500:u=.2:load"ca - rout 1",8,1
2 ifu<.5thenu=.5:load"ca menu ctrl",8,1
3 ifu<1thenu=1:load"ca - rout 2",8,1
4 ifu=2thenclose1:printr$:goto10000
5 ifu=3thenclose1:an=.:al=.:u=2:sys65484:goto10000
6 ifu=4thensyshd:u=2:goto10000
7 ifu=5thenclose1:u=2:sys65484:goto10000
9 ifu=7thensysd2:u=2:sysnm
10 poke55,.:poke56,76:clr:sys39825:.k,160,100:mp=869:ml=1023:ab=12:poke650,128
20 open15,8,15:hf=15:zf=.:rf=4:ba=400:mx=160:my=100:t=128:dq=-.001
30 qx=mx:qy=my:r$=chr$(13):l$=chr$(.)
40 mv=49244:d2=49374:o=49552:el=49553:h2=49554:hi=49557:hs=49560:be=50236
50 sp=50290:hd=50348:nm=50378:hk=50446:hx=50486:li=50500:sr=51562:sa=51615
55 hp=51646:hl=51731:dr=51939:bb=52193:sw=52357:sz=52407:rx=52583:cs=53035
60 fv=1006:bs=53068:ps=37632:fg=37659:pg=37682:ag=37688:fe=37720
90 poke792,202:poke793,196:poke65530,231:poke65531,196:poke785,88:poke786,202
100 dd=37759:hc=39316
110 bo=53280:ue$="[156][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]":do$=""
120 b$=" ":sp$=b$+b$+b$+b$:jy=56320:mo$="moment":bw$="bitte warten"
190 u=2:goto10000
199 remx/y oder z
200 printspc(.);:.n,3:b=(peek(243)+256*peek(244)-55296)/40:c=peek(9)-4
210 print" x / y / z":fori=1to3:.p,i,c+i*4,b,c+i*4+2,b,1:next:.s,14:return
299 reminput
300 n$=chr$(34):a$="":b$=chr$(34):print"";
310 printleft$("[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]",len(n$))n$b$;:wait198,255
315 iflen(n$)>29thenpoke198,.:wait198,1:ifpeek(631)<>20andpeek(631)<>13then315
320 geta$:q=asc(a$):ifq<>13andq<>20andq<>34thenn$=n$+a$:goto310
330 ifq=20andlen(n$)>1thenn$=left$(n$,len(n$)-1):print"[157] [157][157]";:goto310
340 ifq=20orq=34or(q=13andlen(n$)=1)thenprint"[157]";:goto310
350 n$=right$(n$,len(n$)-1):return
399 reminput zahl
400 print" "spc(.)"[157]";:b=peek(243)+256*peek(244)+peek(9)
405 printleft$(" ",-(a<.))int(a)"[157] [157][157][157][157][157][157][157][157][157][157][157][157][157]";
410 printspc(8-len(str$(int(a)))+(a<.));:waitjy,16:poke198,.:l=.:d$=""
420 geta$:ifa$=chr$(20)andlthenl=l-1:d$=left$(d$,l):print"[157] [157]";:goto420
425 ifa$="[133]"thenprintleft$("[157][157][157][157][157][157][157][157][157]",l+1);:goto400
430 on-(a$=r$or(peek(56320)and16)=.)goto450:on-(a$>"9"ora$>"."anda$<"0")goto420
440 on-(a$<"-"orl>7)goto420:print"[149]"a$;:l=l+1:d$=d$+a$:ifl>1goto420
445 print" [157][157][157][157][157][157][157]";:goto420
450 printleft$(l$+"",l+1)"[144]"r$;:fori=btob+7:pokei,.:next
455 b=val(d$):b=b+(b-a)*(l=.):return
499 remfloppy an?
500 open1,8,1:close1:ifst=.thenreturn
510 a=1:gosub900:print"[194]itte [198]loppy einschalten, [198]euer";:gosub700:goto500
549 remhioff
550 poke56576,3:poke53272,23:poke53265,27:return
599 remja/nein
600 print" "spc(.)"[157]";:b=(peek(243)+256*peek(244)-55296)/40:c=peek(9)
605 b=b-(c>39):c=c+40*(c>39)
610 .n,2:.p,1,c-1,b,c+2,b,1:.p,2,c+4,b,c+9,b,1:print" ja / nein":.s,14:return
699 remfeuer
700 waitjy,16:waitjy,16,16:poke198,.:return
799 remfehlerkanal
800 a=1:gosub900:close1:fori=.to1:printa$;:get#15,a$:i=-(a$=r$):next:goto10300
899 remuntere leisten
900 printleft$(do$,22+a*2)"[221]"left$(sp$,38)"[145]";:return
999 **** zeichnen **********************
1000 on-(an=.)goto10400:print"[147]"spc(14)"[218]eichnen"spc(30)left$(ue$,13):pokeel,1
1010 pokeo,224:print"[144] [206]ormal / [211]chraegbild / [211]uper 3d ?":.n,3:.p,1,1,3,8,3,1
1020 .p,2,10,3,22,3,1:.p,3,24,3,33,3,1:.s,14:d=st:ae=2:ifd=2goto1080
1021 print" [200]idden line ?";:gosub600:ifst=2goto1025
1022 ae=1:print" [197]ckpunkte :";:a=an:gosub400:syssa,b,al:sysbb,-mx,-my,.
1023 sysrx,cos(dq),.,-sin(dq),.,1,.,sin(dq),.,cos(dq):sysbb,mx,my,.
1024 printspc(20)"[145]("int(al*b*(b-1)/40)"s)"
1025 d$=" [194]ildschirmabstand :":printd$ba:e$=" [193]uge x :":printe$qx,"y :"qy
1026 print" [193]endern ?";:gosub600:onst-1goto1040:printd$;:a=ba:gosub400:ba=b
1030 printe$;:a=qx:gosub400:qx=b:print" [193]uge y :";:a=qy:gosub400:qy=b
1040 syshk,ba,qx+(NULL)^-5,qy+(NULL)^-5:on-(d=3)goto2000:syshi,hf,zf:pokebo,hf+8
1050 sysdr+(dr-dd)*(ae=1)
1070 pokebo,rf:gosub700:sysnm
1080 syshi,hf,zf:pokebo,hf+8:syshk,ba,qx,qy:pokeel,0:sysdr:goto1070
2000 print" [193]ugenabstand :";:a=ab:gosub400:ab=b:print" [212]empo :";:a=t
2010 gosub400:t=band255:pokesp,t:sysh2,hf,zf:pokebo,h+8:d=dr+(dr-dd)*(ae=1)
2020 syshx,qx+ab/2+(NULL)^-5:sysd:pokebo,hf+6:syshx,qx-ab/2:pokeo,160:sysd
2030 pokebo,rf:u=4:sysbe:u=2:goto10000
2999 **** letztes bild *****************
3000 print"[147]"spc(14)"[204]etztes [194]ild"spc(26)left$(ue$,17)r$"[144] [206]eue [198]arben ?";
3010 a=hf:gosub600:onst-1goto3040
3020 print" [200]intergrund :";:gosub400:print" [218]eichnen :";:hf=band15:a=zf
3030 gosub400:zf=band15:print" [210]ahmen :";:a=rf:gosub400:rf=band15
3040 print" [211]uper 3d ?";:gosub600:pokeo,224:onst-1goto3080:a=t
3050 print" [194]ildwechseltempo :";::gosub400:t=band255:pokesp,t
3060 syshs,hf,zf:pokebo,rf:u=4:sysbe:u=2:goto10000
3080 syshs,hf,zf:goto1070
3999 **** risse ************************
4000 on-(an=.)goto10400:a=.:gosub900:printmo$:z=usr(1)z
4030 pokeo,224:fori=2toan:l=usr(i)z:z=z+(z-l)*(z>l):next:pokeel,.:z=z/2-2
4060 syshi,hf,zf:sysli,mx,.,mx,200:sysli,.,my,320,my:sysrx,.5,.,.,.,.5,.,.,.,.5
4090 syssr,.,.,mx,my:sysdr:syssr,mx,.,319,my:sysrx,.,.,1,.,1,.,1,.,.
4100 sysbb,mx-z,.,.:sysdr:sysrx,.,.,1,-1,.,.,.,1,.:syssr,.,my,mx,199
4110 sysbb,.,360,.:sysdr:sysbb,.,-200-z,.:sysrx,2,.,.,.,.,2,.,-2,.
4120 pokebo,rf:gosub700:gosub550:goto10400
4999 **** bilder tauschen **************
5000 syssw,hf,zf:goto4120
5999 **** hardcopy *********************
6000 a=.:gosub900:print"[194]eide [211]creens ?";:gosub600:a=st:open1,4,4:u=5
6010 pokeel,2-a:ifa=2thenprint#1,""chr$(108)chr$(20);
6020 cmd1,"3";:syshc:print#1,"@";:close1:goto10300
9999 **** menue ************************
10000 pokebo,8:pokebo+1,15:printchr$(8)chr$(14):.r,.,8,308,188
10010 print"[144][147][149]"left$(sp$,16)"ca - graf"left$(sp$,15)"[146][144]";
10050 d$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":d$=d$+d$
10060 print"[176]"left$(d$,12)"[178][192][192][192][192][192][192][192][192][178]"left$(d$,16)"[174][221][210]isszeichng.[221]"spc(8)"[221] ";
10070 print"[196]ateneingabe [221][171]"left$(d$,12)"[179][218]eichnen[221] [196]atenaenderung [221][221]letztes";
10080 print" [194]ild[221]"spc(8)"[171]"left$(d$,16)"[179][221][194]ildertausch[221]"spc(8)"[221] [207]va";
10090 print"l / [214]ieleck [221][171][192][192][192][192][192][192][192][192][192][192][178][192][177][192][192][192][192][192][192][192][192][177][178]"left$(d$,15)"[179][221]"spc(10)"[221]";
10110 printspc(11)"[221] [214]erzerren [221][221] [196]rehen [221][214]erschieben[171]"left$(d$,15)"[179][221]";
10150 printspc(10)"[221]"spc(11)"[221][218]entr. [211]trecken[221][171][192][192][192][192][192][192][192][192][192][192][219]"left$(d$,11)"[219]";
10170 printleft$(d$,15)"[179][221] [218]irkel [221] [203]opieren [221][200]ires speichern[221][171][192][192][192][192][192][192][192][192][192][192][177]";
10180 print"[192][178][192][192][192][192][192][192][192][192][192][177][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][179][221][198].[211]tart/[197]nde[221] [204]aden [221] [200]ardcopy";
10200 print" [221][221] [194]ild [171]"left$(d$,12)"[219]"left$(d$,12)"[179][221] [198]ilmszene [221]";
10230 print" [205]erge [221] [211]peichern [221][171]"left$(d$,12)"[219]"left$(d$,12)"[219]";
10240 printleft$(d$,12)"[179][221] [198]ilm [221] [198]ilm laden [221] [196]irectory [221][221]"spc(12);
10250 print"[221] [198]ilm merge [171]"left$(d$,12)"[179][221] [218]eigen [221][198]. speichern[221]";
10255 print"[198]loppybefehl[221][171]"left$(d$,12)"[177]"left$(d$,12)"[177]"left$(d$,12)"[179][221]";
10260 printspc(37)"[221][157][148] [171]"d$"[179][221]"spc(37)"[221][157][148] [173]"d$"[157][189][157][148][192]";
10300 .n,27:.p,1,1,4,12,4,2:.p,2,14,2,21,5,2:.p,3,23,2,38,2,2:.p,4,1,5,12,5,2
10302 .p,5,23,3,38,3,2:.p,6,1,2,12,2,2:.p,7,23,5,38,5,2:.p,8,1,7,10,9,2
10304 .p,9,12,7,22,9,2:.p,10,24,7,38,7,2:.p,11,24,9,38,9,2:.p,12,1,11,10,11,2
10306 .p,13,12,11,22,11,2:.p,14,24,11,38,11,2:.p,15,1,13,12,13,2
10308 .p,16,14,13,25,13,2:.p,17,27,13,38,13,2:.p,18,1,14,12,14,2
10310 .p,19,1,15,12,15,2:.p,20,14,15,25,15,2:.p,21,27,15,38,15,2
10312 .p,22,1,17,12,19,2:.p,23,14,17,25,17,2:.p,24,27,17,38,17,2
10314 .p,25,14,18,25,18,2:.p,26,14,19,25,19,2:.p,27,27,19,38,19,2
10400 pokebo,8:u=2:poke198,.:geta$:syssr,.,.,319,199
10402 .s,15:ifanthensyshp,.,.,.,.:syssa,an,al
10410 onstgoto3000,1000,20000,5000,25000,4000,45000,30000,40000,41000,42000
10420 onst-11goto46000,35000,56000,47000,51000,6000,47500,44000,52000,50000
10430 onst-21goto48500,49000,54000,49500,48000,55000
19999 **** koordinateneingabe **********
20000 print"[147]"spc(10)"[196]aten eingeben"spc(24)left$(ue$,19)
20010 print"[144] [206]eue [196]aten eingeben ?";:gosub600:ifst=1thenan=.:al=.
20040 print" [194]itte geben [211]ie die [203]oordinaten ein!":a=.
20050 b$="-[203]oordinate [208]unkt [145]":print" x"b$an+1":";:gosub400:x=b
20060 print" y"b$an+1":";:gosub400:y=b:print" z"b$an+1":";:gosub400:an=an+1
20070 syshp,an,x,y,b:on-(an=mp)goto20130:print" [206]och einen [208]unkt ?[145]";
20110 gosub600:onstgoto20050
20130 print" [202]etzt bitte die [208]unkte eingeben, die miteinander verbunden ";
20140 print"werden sollen!":a=1
20160 al=al+1:print" [208]unkt 1 ; [204]inie [145]"al":";:gosub400:c=b+1:a=c+(c-1)*(c>an)
20170 c=b:ifb<1orb>anthenprint" [197]xsistiert nicht":al=al-1:goto20160
20180 print" [208]unkt 2 ; [204]inie [145]"al":";:gosub400:on-(b<1orb>an)goto20170
20200 syshl,al,c,b:on-(al=ml)goto10000
20230 print" [206]och eine [204]inie ?[145]";:a=b:gosub600:onstgoto20160,10000
24999 **** daten veraendern ************
25000 print"[147]"spc(13)"[196]aten aendern"spc(25)left$(ue$,18):print"[144] [208]unkt :"1
25010 print" x:"left$(str$(int(usr(1)x)),8)tab(14)"y:";:c$=" [157][157][157][157][157][157][157][157]"
25020 printleft$(str$(int(usr(1)y)),8)tab(26)"z:"left$(str$(int(usr(1)z)),8)
25025 print" [204]inie : 1"r$" [208]unkt1 :"usr(1)0tab(20)"[208]unkt2 :"usr(1)1
25030 print" [193]nzahl [208]unkte :"an;r$" [193]nzahl [204]inien :"al:p=1:k=1
25040 geta$:on-(an=.)goto25060:if(peek(jy)and1)=.thenp=p+1+p*(p=an):goto25100
25050 if(peek(jy)and2)=.thenp=p-1-an*(p=1):goto25100
25060 on-(al=.)goto25080:if(peek(jy)and8)=.thenk=k+1+k*(k=al):goto25200
25070 if(peek(jy)and4)=.thenk=k-1-al*(k=1):goto25200
25080 on-(a$="p")-2*(a$="l")-3*(a$="a")goto25300,25400,25500
25090 on(peek(jy)and16)/16+1goto10000,25040
25100 printleft$(do$,7)tab(9)p"[157] ":printleft$(do$,9)tab(4)c$int(usr(p)x);
25110 printtab(16)c$int(usr(p)y)tab(28)c$int(usr(p)z):goto25040
25200 printleft$(do$,12)tab(9)k"[157] ":printleft$(do$,14)tab(10)c$usr(k)0tab(28);
25210 printc$usr(k)1:goto25040
25300 printleft$(do$,9)tab(4);:a=usr(p)x:gosub400:x=b:print"[145]"tab(16);
25310 a=usr(p)y:gosub400:y=b:print"[145]"tab(28);:a=usr(p)z:gosub400
25320 syshp,p,x,y,b:goto25040
25400 printleft$(do$,14)tab(10);:a=usr(k)0:gosub400:x=b:print"[145]"tab(28);
25410 a=usr(k)1:gosub400:syshl,k,x,b:goto25040
25500 printleft$(do$,17)tab(17);:a=an:gosub400:on-(b>mp)goto25500:an=b:a=al
25600 printleft$(do$,20)tab(17);:gosub400:on-(b>ml)goto25600:al=b:goto25040
29999 **** drehen **********************
30000 on-(an=.)goto10400:print"[147]"spc(14)"[196]rehen"spc(32)left$(ue$,11)
30030 print"[144] [218]u welcher [193]chse soll die [196]rehachse parallel sein ?";
30050 a=my:d=.:z$="z":y$="y":gosub200:ifst=3thenz$="y":y$="x":a=mx:d=my
30060 b$="-[203]oordinate der [193]chse :":ifst=2theny$="x":z$="z":d=.:a=mx
30080 print" "y$b$;:gosub400:z=b:print" "z$b$;:a=d:gosub400:y=b:a=.
30100 print" [196]rehwinkel :";:gosub400:w=b/180*(NULL):a=sin(w):b=cos(w)
30110 printspc(148)mo$:onst-1goto30140,30130
30120 sysbb,.,-z,-y:sysrx,1,.,.,.,b,a,.,-a,b:sysbb,.,z,y:goto10000
30130 sysbb,-z,-y,.:sysrx,b,a,.,-a,b,.,.,.,1:sysbb,z,y,.:goto10000
30140 sysbb,-z,.,-y:sysrx,b,.,-a,.,1,.,a,.,b:sysbb,z,.,y:goto10000
34999 **** kopieren ********************
35000 ifan=.oran*2>mporal*2>mlgoto10400
35010 print"[147]"spc(10)"[203]opieren"spc(30)left$(ue$,13)r$:a=.
35030 b$="[144] [214]erschieben - ":printb$"x :";:gosub400:x=b:printb$"y :";:gosub400
35040 y=b:printb$"z :";:gosub400:z=b:a=1:b$=" [218]erren - ":printr$b$"x :";
35050 gosub400:vx=b:x=x*b+mx-mx*b:printb$"y :";:gosub400:vy=b:y=y*b+my-my*b
35060 printb$"z :";:gosub400:vz=b:z=z*b:poke144,2
35080 on-(2*al+an>ml)goto35102:print" [203]opien verbinden ?";:gosub600
35102 printspc(63)bw$:sysrx,vx,.,.,.,vy,.,.,.,vz:sysbb,x,y,z
35110 fori=1toan:a=usr(i)x:b=usr(i)y:c=usr(i)z:syshp,i+an,a,b,c:next
35112 sysrx,1/vx,.,.,.,1/vy,.,.,.,1/vz:sysbb,-x/vx,-y/vy,-z/vz
35120 fori=1toal:a=usr(i)0+an:b=usr(i)1+an:syshl,i+al,a,b:next:al=2*al
35130 ifst=1thenfori=1toan:syshl,i+al,i,i+an:next:al=al+an
35140 an=2*an:goto10000
39999 **** verschieben *****************
40000 on-(an=.)goto10400:a=.:gosub900:print"x:";:gosub400:print"[145]"spc(13)"y:";
40010 x=b:gosub400:y=b:print"[145]"spc(26)"z:";:gosub400
40020 a=1:gosub900:printmo$;:sysbb,x,y,b:gosub900:goto10400
40999 **** verzerren *******************
41000 on-(an=.)goto10400:a=.:gosub900:print"x:";:a=1:gosub400
41010 print"[145]"spc(13)"y:";
41020 x=b:gosub400:y=b:print"[145]"spc(26)"z:";:gosub400:gosub900:printmo$;
41030 sysrx,x,.,.,.,y,.,.,.,b:sysbb,mx-mx*x,my-my*y,.:gosub900:goto10400
41999 **** zentrisches strecken ********
42000 on-(an=.)goto10400:a=.:gosub900:print"[218]ntr.x:";:a=mx:gosub400:x=b:a=my
42010 print"[145]"spc(17)"y:";:gosub400:y=b:print"[145]"spc(28)"z:";:a=.:gosub400:z=b
42020 a=1:gosub900:print"[211]treckfaktor :";:gosub400:print"[145]"spc(26)mo$"[157][157][157][157][157][157]";
42030 sysrx,b,.,.,.,b,.,.,.,b:sysbb,x-b*x,y-b*y,z-b*z:print" ";:goto10400
43999 **** film szene ******************
44000 ifpeek(152)<2oran=.goto10400
44010 print"[147]"spc(13)"[198]ilmszene"spc(29)left$(ue$,14)r$"[144] [214]erschieben:"
44020 print" x:";:a=.:gosub400:vx=b:printspc(14)"[145]y:";:gosub400:vy=b
44030 printspc(26)"[145]z:";:gosub400:vz=b:print" [214]erzerren:"r$" x:";:a=1
44040 gosub400:x3=b:printspc(14)"[145]y:";:gosub400:y3=b:printspc(26)"[145]z:";
44045 gosub400:z3=b:printleft$(do$,8)" [196]rehen:":print" zu x - [193]chse: y:";
44050 a=my:gosub400:y1=b:printspc(26)"[145]z:";:a=.:gosub400:z1=b:c$=" [215]inkel :"
44060 printc$;:gosub400:w1=b/180*(NULL):print" zu y - [193]chse: x:";:a=mx:gosub400
44070 x1=b:printspc(26)"[145]z:";:a=.:gosub400:z2=b:printc$;:gosub400:w2=b/180*(NULL)
44080 print" zu z - [193]chse: x:";:a=mx:gosub400:x2=b:printspc(26)"[145]y:";:a=my
44090 gosub400:y2=b:printc$;:a=.:gosub400:print" [214]erschieben der [196]rehachsen:"
44100 w3=b/180*(NULL):print" x:";:a=.:gosub400:x=b:printspc(14)"[145]y:";:gosub400:y=b
44105 printspc(26)"[145]z:";:gosub400:z=b:a=fm/(6*al+1)
44110 print" [193]nzahl der [211]chritte :";:gosub400:ae=b:p=an:ifb=.goto10000
44115 print" [198]luchtpunkt ?";:gosub600:pokeel,2-st:d=dr+10:ifst=2goto44120
44116 ifst=1thenprint" [200]idden line ?";:gosub600:ifst=2goto44120
44118 d=dd+10:print" [197]ckpunkte :";:a=an:gosub400:p=b:sysbb,-mx,-my,.
44119 sysrx,cos(dq),.,-sin(dq),.,1,.,sin(dq),.,cos(dq):sysbb,mx,my,.
44120 a=cos(w1):w1=sin(w1):b=cos(w2):w2=sin(w2):c=cos(w3):w3=sin(w3):syssz
44122 vx=x3*(vx-mx)+mx:vy=y3*(vy-my)+my:vz=vz*z3
44124 m1=x3*b*c:m2=y3*c*w1*w2+y3*a*w3:m3=z3*w1*w3-z3*a*c*w2
44126 m4=-x3*b*w3:m5=y3*a*c-y3*w1*w2*w3:m6=z3*a*w2*w3+z3*w1*c
44128 m7=x3*w2:m8=-y3*b*w1:m9=a*b*z3
44130 pokeo,224:fori=1toae:syshi,hf,zf:print#2,chr$(255);
44135 pokefv+1,(fm-1)/256:pokefv,fm-1and255:syssa,p,al:sysd:syssa,an,al
44137 fm=peek(fv)+256*peek(fv+1):fm=fm+2^15*(fm>=2^15):x1=x1+x:y1=y1+y:z1=z1+z
44140 x2=x2+x:y2=y2+y:z2=z2+z:q=(vx-x1)*b-w2*(w1*(y1-vy)+a*(vz-z1)+z1-z2)+x1-x2
44150 sysrx,m1,m2,m3,m4,m5,m6,m7,m8,m9
44155 l=a*(vy-y1)+w1*(vz-z1)+y1-y2:w=q*c+l*w3+x2
44160 sysbb,w,c*l-q*w3+y2,b*(w1*(y1-vy)+a*(vz-z1)+z1-z2)+(vx-x1)*w2+z2:next
44180 gosub550:print"[147]":iffm<.thenprint" [198]ilm zu lang!"
44190 printspc(2)fm"[198]ilmbytes noch frei.":gosub700:goto10000
44999 **** oval / vieleck **************
45000 on-(al<.)goto10400:print"[147]"spc(9)"[207]val / [214]ieleck"spc(24)left$(ue$,19)
45010 a=24:print"[144] [215]ieviele [197]cken ?";:gosub400:ifan+b>mporal+b>mlgoto10000
45020 ae=b:b$=" - [205]itte :":print" x"b$;:a=mx:gosub400:vx=b:print" y"b$;
45030 a=my:gosub400:vy=b:print" z"b$;:a=.:gosub400:vz=b:w=2*(NULL)/ae
45040 print" [194]itte zwei [214]ektoren fuer die"spc(12)"[210]adien eingeben!":a=.
45050 print" x1 :";:a=.:gosub400:x=b:printtab(14)"[145]y1 :";:gosub400:y=b:p=.
45060 printtab(26)"[145]z1 :";:gosub400:z=b:print" x2 :";:a=y:gosub400:x1=b:a=x
45080 printtab(14)"[145]y2 :";:gosub400:y1=b:printtab(26)"[145]z2 :";:a=.:gosub400:z1=b
45110 printspc(103)bw$:fori=.to2*(NULL)-.0001stepw:a=cos(i):b=sin(i):p=p+1:print"[145]"p
45120 syshp,p+an,vx+a*x+b*x1,vy+a*y+b*y1,vz+a*z+b*z1:syshl,al+p,an+p,an+p+1
45125 next:syshl,al+ae,an+ae,an+1:an=an+ae:al=al+ae:goto10000
45999 **** zirkel **********************
46000 on-(an=.)goto10400:print"[147]"spc(16)"[218]irkel"spc(32)left$(ue$,11)r$"[144] ";
46020 print"[218]u welcher [193]chse soll die [205]ittel- achse parallel sein ?";
46040 gosub200:z$="y":y$="x":a=mx:c=my:ifst=2thenz$="z":c=.
46050 b$="-[203]oordinate der [193]chse :":ifst=1thenz$="z":y$="y":a=my:c=.
46060 print" "y$b$;:gosub400:z=b:print" "z$b$;:a=c
46070 gosub400:y=b:a=mp/an:b=ml/an:a=int(a+(a-b)*(b<a))
46080 print" [193]nzahl der [196]rehungen:";:gosub400:ae=b:d=st:ifb<=1orb>agoto10000
46085 poke144,2:ifb*(al+an)<mlthenprint" [196]rehungen verbinden ?";:gosub600
46090 printspc(24)""bw$:ond-1goto46170,46140
46110 fori=1toae-1:k=i*an:w=i/ae*2*(NULL):a=sin(w):b=cos(w)
46120 forj=1toan:c=usr(j)y-z:d=usr(j)z-y:x=usr(j)x
46130 syshp,j+k,x,c*b-d*a+z,c*a+d*b+y:next:next:goto46200
46140 fori=1toae-1:k=i*an:w=i/ae*2*(NULL):a=sin(w):b=cos(w)
46150 forj=1toan:c=usr(j)y-y:d=usr(j)x-z:x=usr(j)z
46160 syshp,j+k,d*b-c*a+z,d*a+c*b+y,x:next:next:goto46200
46170 fori=1toae-1:k=i*an:w=i/ae*2*(NULL):a=sin(w):b=cos(w)
46180 forj=1toan:c=usr(j)z-y:d=usr(j)x-z:x=usr(j)y
46190 syshp,j+k,d*b-c*a+z,x,d*a+c*b+y:next:next
46200 fori=1toae-1:k=i*al:c=i*an
46210 forj=1toal:a=usr(j)0:b=usr(j)1:syshl,k+j,c+a,c+b:next:next
46220 al=al*ae:ifst<>1goto46250
46230 k=al:fori=.toan-1:forj=.toae-2:syshl,k+j+1,j*an+i+1,j*an+i+an+1:next
46240 syshl,k+j+1,j*an+i+1,i+1:k=k+ae:next:al=al+an*ae
46250 an=an*ae:goto10000
46999 **** film start/ende *************
47000 a=.:gosub900:onpeek(152)-1goto47100:print"[206]ame :";:gosub300:n$=n$+",p,w"
47010 open2,8,3,n$:print#2,l$"l";:get#15,a$:fm=16380:close3+(a$>"0"):goto800
47100 gosub900:print"[211]icher ?";:gosub600:ifst=2goto10300
47110 print#2,chr$(254);:close2:goto800
47499 **** bild speichern *************
47500 onpeek(152)or-(an=.)goto10400:a=.:gosub900
47510 print"noch"fm"[198]ilmbytes,<="al*6+1"benoetigt":print"[198]luchtpunkt ?";
47520 gosub600:pokeel,2-st:d=dr:ifst=2goto47530
47522 gosub900:print"[200]idden line ?";:gosub600:ifst=2goto47530
47524 d=dd:a=1:gosub900:print"[197]ckpunkte :";:a=an:gosub400:syssa,b,al
47530 syssz:syshi,hf,zf:pokeo,224:print#2,chr$(255);:pokefv+1,fm/256
47540 pokefv,fmand255:sysd+10:fm=peek(fv)+256*peek(fv+1):fm=fm+2^15*(fm>2^15)-1
47550 goto44180
47999 **** film speichern *************
48000 on(al<.)+1goto10400:a=.:gosub900:print"[206]ame :";:gosub300:a=1:gosub900
48010 gosub500:print"saving":sysfe:i=peek(253)+256*peek(254)-19456:poke252,76
48040 poke253,iand255:poke254,i/256:open1,8,1,n$:get#15,a$:ifa$>"0"goto800
48050 poke251,.:u=5:cmd1,l$"l";:sysps:print#1:u=2:close1:goto800
48499 **** film zeigen ****************
48500 on(al<.)+1goto10400:a=.:gosub900:print"endlos ?";:gosub600:pokebo,rf
48510 pokeel,2-st:waitjy,16:u=7:sysmv,hf,zf:waitjy,16,16:sysnm
48999 **** film laden / merge **********
49000 poke19456,254:al=.:an=.
49500 p=st:on-(al>-1andst=25)goto10400:a=.:gosub900:print"[206]ame :";:gosub300:a=1
49510 gosub900:gosub500:print"loading":sysfe:poke251,peek(253):a=.:u=3
49530 poke252,peek(254):open1,8,.,n$:get#15,a$:on-(a$>"0")goto800:get#1,b$,b$
49540 poke781,1:sys65478:sysfg:sys65484:gosub900:al=-1:ifpeek(252)>139goto49560
49550 sysfe:print35840-peek(253)-256*peek(254)"[194]ytes frei.":goto800
49560 print"[198]ilm zu lang !":close1:pokepeek(253)+256*peek(254),254:al=p=25
49570 goto800
49999 **** speichern *******************
50000 on-(an=.)goto10400:a=.:gosub900:print"[206]ame :";:gosub300:gosub500:a=1
50020 gosub900:print"saving":open1,8,1,n$+",s,w":get#15,a$:ifa$>"0"goto800
50040 u=5:cmd1,chr$(anand255)chr$(an/256)chr$(aland255)chr$(al/256);
50050 sysbs:print#1:u=2:close1:goto800
50999 **** laden / merge **************
51000 al=.:an=.
52000 al=al-(al=-1):a=.:gosub900:print"[206]ame :";:gosub300:gosub500:a=1:gosub900
52010 print"loading":open1,8,2,n$+",s,r":get#15,a$:ifa$>"0"goto800
52030 get#1,a$,b$,c$,d$:a=asc(a$+l$)+256*asc(b$+l$):b=asc(c$+l$)+256*asc(d$+l$)
52040 on-(an+a>mporal+b>ml)goto52110:u=3:pokeag,4:fori=.to2:c=20485+4352*i+5*an
52050 poke252,c/256:poke251,c-int(c/256)*256:poke254,a/256:poke253,aand255
52060 syspg:next:c=33538+al*2:poke253,band255:pokeag,1:poke252,c/256
52070 poke251,c-int(c/256)*256:poke254,b/256:syspg:poke254,b/256:c=35586+al*2
52080 poke252,c/256:a$="":poke251,c-int(c/256)*256:poke253,band255:syspg:close1
52090 ifalthenfori=al+1toal+b:c=usr(i)0+an:d=usr(i)1+an:syshl,i,c,d:next
52100 al=al+b:an=an+a:goto800
52110 close1:print"[145]zu viel!":goto10400
53999 **** directory *******************
54000 gosub500::open1,8,.,"$":get#15,a$:on-(a$>"0")goto800:print"[147]"
54010 printtab(6);:fori=.to7:get#1,a$,b$,c$,d$:printa$b$c$d$;:next:print"":f=6
54020 f=6-f:poke646,f:get#1,a$,a$,a$,b$:printasc(a$+l$)+256*asc(b$+l$);
54030 fori=.to3:get#1,a$,b$,c$,d$,e$,f$,g$:printa$b$c$d$e$f$g$;:next
54040 waitjy,16:print:on-(st=.)goto54020:close1:gosub700:goto10000
54999 **** disk-kommando ***************
55000 a=.:gosub900:print"?";:gosub300:gosub500:print#15,n$:get#15,a$:goto800
55999 **** hires speichern *************
56000 a=.:gosub900:print"[206]ame :";:gosub300:a=1:gosub900:syssw,15,.:gosub550
56010 open1,8,1,n$+",p,w":get#15,a$:ifa$>"0"goto800
56020 poke251,.:poke252,160:print#1,chr$(0)chr$(32);:print"saving":syscs
56030 close1:syssw,15,.:gosub550:goto800
63999 * (w) 1986 by fridtjof siebert *